              package com.java.diagnostics.visualizer.impl.axes;
              
              import com.java.diagnostics.visualizer.data.axes.Axis;
              
              public abstract class AxisImpl
                implements Axis
              {
                private final String id;
                private final String baseUnits;
                private final String baseLabel;
                private final int type;
                private static final String CLOSE_PARENTHESIS = ")";
                private static final String OPEN_PARENTHESIS = " (";
              
                public AxisImpl(String id, String label, String baseUnits, int type)
                {
                  this.id = id;
                  this.baseUnits = baseUnits;
                  this.baseLabel = label;
                  this.type = type;
                }
              
                public String getBaseUnitName()
                {
                  return this.baseUnits;
                }
              
                public int getType()
                {
                  return this.type;
                }
              
                public String getLabel()
                {
                  return this.baseLabel;
                }
              
                public boolean equals(Object object)
                {
                  boolean equal = true;
              
                  if (this == object) {
                    equal = true;
                  }
                  else if (!(object instanceof AxisImpl)) {
                    equal = false;
                  }
                  else
                  {
                    AxisImpl axis = (AxisImpl)object;
                    if (this.type != axis.type)
                      equal = false;
                    else if ((this.baseLabel != null) && (!this.baseLabel.equals(axis.baseLabel)))
                      equal = false;
                    else if ((this.baseUnits != null) && (!this.baseUnits.equals(axis.baseUnits)))
                      equal = false;
                    else {
                      equal = true;
                    }
                  }
                  return equal;
                }
              
                public int hashCode()
                {
                  return this.baseLabel.hashCode() ^ this.baseUnits.hashCode();
                }
              
                public String toString()
                {
                  if (this.type != 1) {
                    return this.baseLabel + " (" + this.baseUnits + 
                      ")";
                  }
                  return this.baseLabel;
                }
              
                public String getID()
                {
                  return this.id;
                }
              }

